﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class QueryString : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["Comp"] != null)
	{
		string Company =  Request.QueryString["Comp"];
            lblCompany.Text = Company;
	}
        
        if (Request.QueryString["mod"] != null)
	{
        string Model = Request.QueryString["mod"];
        LblModel.Text = Model;
	}


            
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("QueryString.aspx?Comp=Tata");
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("QueryString.aspx?Comp=Tata&mod=Nano");
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        Response.Redirect("QueryString.aspx?mod=Indica");
    }

    protected void BtnSubmit_Click(object sender, EventArgs e)
    {
        string Url;
        Url = "DisplayValue.aspx?ViewId=0&";
        Url += "FName=" +TxtFName.Text;
        Url += "&LName=" + TxtLName.Text;
        Url += "&Email=" + TxtEmail.Text;
        Url += "&Dob=" + TxtDob.Text;
        Response.Redirect(Url);

    }
}
